<!DOCTYPE html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">



<link rel="stylesheet" type="text/css" href="css/search.css">
<link rel="stylesheet" type="text/css" href="css/iconfont.css">


<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/common.js"></script>

<title>搜索</title>
</head>

<body class="main">

<header id="login-head" style="border:none;">
    <div class="search-left" ><i class="iconfont icon-shangcheng" id="more"></i><i class="iconfont icon-xiala"></i></div>
    <div class="search-middle">
    	<div class="search-form">
            <a href="javascript:;"><input id="keyword" type="search" placeholder="搜索您需要的关键词"></a>
            <div class="icon-search-left"></div>
            <div class="icon-search-right" style="display:none;"></div>
        </div>
    </div>
    <div class="menu">
        <i class="iconfont  icon-icon-up"></i>
        <ul class="">
            <li><a href="javascript:;">
                <i class="iconfont icon-stroe"></i>
                <span>商城</span></a>
            </li>
            <li><a href="javascript:;">
                <i class="iconfont icon-chushouzhong"></i>
                <span>出售</span></a>
            </li>
            <li><a href="javascript:;">
                <i class="iconfont icon-qiugou2"></i>
                <span>求购</span></a>
            </li>
        </ul>
    </div>
	<div class="search-right"><a href="javascript:; " onclick="history.back(-1)">取消</a></div>
</header>
<div class="head-bg"></div>

<article>
	<div class="search-box clearfix">
    	<dl class="search-one">
        	<dt>最近搜索<i class="icon-search-close"></i></dt>
            <dd>关键词</dd><dd>关键词</dd><dd>流量推广</dd><dd>关键词</dd><dd>关键词</dd><dd>关键词</dd><dd>流量推广</dd>
        </dl>
    	<dl class="search-two">
        	<dt>大家都在搜</dt>
            <dd>流量推广</dd><dd>关键词</dd><dd>流量推广</dd><dd>关键词</dd>
            <dd>关键词</dd><dd>关键词</dd><dd>关键词</dd><dd>流量推广</dd>
        </dl>
    </div>
</article>
<script>
    $(function() {
        morel();
        $("input[type=text]").keyup(function() {
            var value = $(this).val();
            if ( value == ""){
                $(".icon-search-right").hide(); 
            }else{
                $(".icon-search-right").show(); 
            }
        });
        $(".icon-search-right").click(function() {
		    $(this).parent().find('input').val('');
            $(this).hide();
        });
        $(".icon-search-close").click(function() {
            $('.search-one').hide();
        });
        var searchName='';
        //搜索按钮的点击事件
        $("#keyword").on('keyup',function(e) {
            var keycode = e.keyCode;
            searchName = $(this).val();
            if(keycode=='13') {
                e.preventDefault();
                alert('1')
                //请求搜索接口
            }
        });
        $(".icon-search-left").click(function() {

        });
    });
</script>
</body>
</html>
